<template>
	<div class="job">
		<div class="jobcon">
			<el-form ref="form" :model="form" class='elform' label-width="80px">
				<p><img src="../../assets/image/navicon/1.png" /><span>基本信息</span></p>
				<el-form-item label="真实姓名">
					<el-col :span='11'>
						<el-input :disabled="true"  v-model="form.name"></el-input>
					</el-col>
					<el-col :span='10' :push='1'>
						<el-radio-group v-model="form.resource">
							 <el-radio disabled label="男"></el-radio>
							 <el-radio disabled label="女"></el-radio>
						</el-radio-group>
					</el-col>
				</el-form-item>

				<el-form-item label="出生日期">
					<el-col :span="11">
						<el-date-picker disabled type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
					</el-col>
					<el-col :span="11" :push='2'>
						 <el-select disabled v-model="form.xueli" placeholder="请选择你的学历信息">
							<el-option label="初中" value="初中"></el-option>
							<el-option label="高中" value="高中"></el-option>
							<el-option label="中专" value="中专"></el-option>
							<el-option label="大专" value="大专"></el-option>
							<el-option label="本科" value="本科"></el-option>
							<el-option label="研究生" value="研究生"></el-option>
							<el-option label="硕士" value="硕士"></el-option>
						</el-select>
					</el-col>
				</el-form-item>

				<el-form-item label="现所在地">
					<el-col :span='11'>
						<div class="block">
							<el-cascader disabled :options="form.city" v-model="form.selectedCity" style="width: 100%;" @change="handleChange">
							</el-cascader>
						</div>
					</el-col>
				</el-form-item>

				<el-form-item label="户籍地址">
					<el-col :span='11'>
						<div class="block">
							<el-cascader disabled :options="form.city2" v-model="form.selectedCity2" style="width: 100%;" @change="handleChange2">
							</el-cascader>
						</div>
					</el-col>
				</el-form-item>
				<!-----------------------这是一条华丽的分割线-------------------->
				<el-form-item label="工作年限">
					 <el-select disabled v-model="form.region" placeholder="请选择">
						<el-option label="区域一" value="shanghai"></el-option>
						<el-option label="区域二" value="beijing"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="目前状态">
					 <el-select disabled v-model="form.region" placeholder="请选择">
						<el-option label="区域一" value="shanghai"></el-option>
						<el-option label="区域二" value="beijing"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="联系方式">
					<el-col :span='6'>
						<el-input :disabled="true" v-model="form.tel" @blur='telyan'></el-input>
					</el-col>
				</el-form-item>
				<p><img src="../../assets/image/navicon/4.png" /><span>技能管理</span></p>

				<el-form-item label="证书管理">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="学历经历">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="培训经历">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="劳动技能">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="社会关系">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="智能鉴定">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="个人信用">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="职称资格">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="现任岗位">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="出国情况">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="奖罚信息">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="健康情况">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="特长证书">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="家庭成员">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="合同管理">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<el-form-item label="人事代理">
					<el-col :span='22'>
						<el-input :disabled="true" type="textarea" v-model="form.desc"></el-input>
					</el-col>
				</el-form-item>
				<div style="text-align: center;">
					<el-button type="primary" @click="onSubmit()" size='small'>返回</el-button>
				</div>
			</el-form>
		</div>
	</div>
</template>
<script type="text/javascript">
	import { city, shengshixian } from "@/assets/js/city";
	export default {
		data() {
			return {

				form: {
					name: '',
					resource: '',
					date1: '',
					region: '',
					tel: '',
					date2: '',
					delivery: false,
					type: [],

					desc: '',
					city: city,
					city2: city,
					selectedCity: [],
					selectedCity2: [],
				}
			}
		},
		created() {

		},
		methods: {
			onSubmit() {
				//				console.log(this.$store.state.city);
//				this.$message({
//					message: '提交成功',
//					type: 'success'
//				});
//				this.$emit('closejob', 'close');
				this.$router.go(-1);

			},
			handleChange() {
				let selec = this.form.selectedCity;
				let objssx = shengshixian(selec);
				console.log(objssx);
			},
			handleChange2() {
				let selec = this.form.selectedCity2;
				let objssx = shengshixian(selec);
				console.log(objssx);
			},

			telyan(e) {
				//				去除手机号空格
				let tel = this.form.tel.trim();
				let reg = /^1[3|4|5|8][0-9]\d{4,8}$/
				if(!reg.test(tel)) {
					this.$notify.error({
						title: '错误',
						message: '你输入的手机号不合法'
					});
				}

			}
		},
		computed: {

		},
		mounted() {

		}
	}
</script>
<style lang="scss" scoped>
	.job {
		position: absolute;
		width: 100%;
		left: 0%;
		right: 0%;
		top: 40px;
		bottom: 20px;
		background-color: white;
		.jobcon {
			width: 100%;
			height: 100%;
			background-color: white;
			overflow: auto;
			.tijiao {
				text-align: center;
			}
		}
		.elform {
			position: absolute;
			top: 16px;
			left: 20px;
			right: 0px;
			bottom: 10px;
			overflow: auto;
			p {
				margin-bottom: 10px;
				img {
					width: 18px;
					margin-top: 10px;
					display: inline-block;
					margin-right: 10px;
				}
				span {
					line-height: 30px;
					font-size: 17px;
				}
			}
		}
	}
</style>